.nova-color-picker-form {
  margin: 5px 10px;
  will-change: transform;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  position: relative;
}

.nova-color-picker-labels {
  width: 175px;
  justify-content: space-between;
  display: flex;
}

.nova-color-picker-label {
  width: 55px;
  display: flex;
  flex-direction: column;
}

.nova-color-picker-panel-has-alpha {
  .nova-color-picker-label {
    width: 40px;
  }

  .nova-color-picker-hex {
    width: 85px;
  }
}

.nova-color-picker-label-text {
  line-height: var(--nova-line-height);
  height: 20px;
  text-align: center;
}

.nova-color-picker-input,
.nova-color-picker-hex {
  height: 25px;

  input {
    vertical-align: top;
    color: var(--nova-color-font);
    border: none;
    background: none;
    height: 25px;
    line-height: 15px;
    padding: 0;
    text-align: center;
    font-size: var(--nova-font-size);
    width: 100%;
    font-family: var(--nova-font-monospace);
    will-change: contents;
    direction: ltr;

    &:hover,
    &:focus {
      + .nova-color-picker-input-border {
        border: var(--nova-border-primary);
      }
    }

    &:focus {
      outline: none;

      + .nova-color-picker-input-border {
        box-shadow: var(--nova-shadow-primary);
      }
    }
  }
}

.nova-color-picker-input {
  width: 100%;
}

.nova-color-picker-input-border {
  height: 25px;
  background-color: var(--nova-color-bg-component);
  border: 1px solid var(--nova-color-border-component);
  pointer-events: none;
  margin-top: -25px;
  border-radius: var(--nova-radius);
  transition: var(--nova-transition-component);
}

.nova-color-picker-output {
  margin-top: 5px;
  display: flex;
  justify-content: flex-end;
}

.nova-color-picker-hex {
  width: 115px;
}

.nova-color-picker-labels-switch {
  align-self: flex-start;
  margin-top: 20px;
  width: 20px;
  height: 25px;
  margin-bottom: -45px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: var(--nova-radius);
  transition: var(--nova-transition-border);
  border: var(--nova-border-invisible);

  &:before,
  &:after {
    width: 0;
    height: 0;
    border-style: solid;
    content: '';
    display: block;
    transition: var(--nova-transition-border);
  }

  &:before {
    border-width: 0 3px 3px 3px;
    border-color: transparent transparent var(--nova-color-symbol) transparent;
    margin-bottom: 2px;
  }

  &:after {
    border-width: 3px 3px 0 3px;
    border-color: var(--nova-color-symbol) transparent transparent transparent;
    margin-top: 2px;
  }

  &:hover {
    border: var(--nova-border-primary);

    &:before {
      border-color: transparent transparent var(--nova-color-font) transparent;
    }

    &:after {
      border-color: var(--nova-color-font) transparent transparent transparent;
    }
  }

  &:focus {
    outline: none;
    border: var(--nova-border-primary);
    box-shadow: var(--nova-shadow-primary);
  }
}
